home *** CD-ROM | disk | FTP | other *** search
- Path: mail2news.demon.co.uk!genesis.demon.co.uk
- From: Lawrence Kirby <fred@genesis.demon.co.uk>
- Newsgroups: comp.lang.c
- Subject: Re: given: char foo[80]; there is no such thing as element foo[80] correct? (i.e. foo[80] = '\0' is beyond the array boundary)
- Date: Fri, 15 Mar 96 15:39:42 GMT
- Organization: none
- Message-ID: <826904382snz@genesis.demon.co.uk>
- References: <3148DBB6.1353@hawaii.edu>
- Reply-To: fred@genesis.demon.co.uk
- X-NNTP-Posting-Host: genesis.demon.co.uk
- X-Newsreader: Demon Internet Simple News v1.27
- X-Mail2News-Path: genesis.demon.co.uk
-
- In article <3148DBB6.1353@hawaii.edu> davec@hawaii.edu "Dave Carien" writes:
-
- >Yes or no on this, I just recently got confused by two different books. I
- >assume that the declaration foo[80] allocates storage for elements 0-79.
- >A string could be terminated by doing something like foo[79] = '\0', but
- >foo[80] = '\0' would be invalid because such an element does not exist.
- >Just looking for confirmation that I'm right here. A simple Y or N will
- >do thanks.
-
- That is correct, sorry Y
-
- --
- -----------------------------------------
- Lawrence Kirby | fred@genesis.demon.co.uk
- Wilts, England | 70734.126@compuserve.com
- -----------------------------------------
-